<template>
  <div>
      <van-row>
        <van-col span="24">
            <heads/>
        </van-col>
      </van-row>

      <van-row>
        <van-col span="2">
            <left/>
        </van-col>
        <van-col span="10">
            组织名称：<input type="text" placeholder="请输入组织名称" v-model="text">
            <van-button color="purple">查询</van-button> <br>
            <van-button color="black">重置</van-button>
            <van-button color="blue">新增</van-button>

            <van-uploader :after-read="upload" />
            <van-button color="green" @click="derive()">导出</van-button>
        </van-col>
      </van-row>

  </div>
</template>

<script>
import left from '../comm/left.vue'
import heads from '../comm/heads.vue'
import axios from '../../http/axios'
export default {
    components:{
        'left':left,
        'heads':heads
    },
    data(){
        return{
            text:''
        }
    },
    methods:{
        upload(file){
            let fromData = new FormData()
            fromData.append('file',file.file)
            axios('upload','post',fromData).then(res=>{
                this.$toast.fail('导入成功')
                console.log(res);
            })
        },
        derive(){
            axios('download','get').then(res=>{
                console.log(res);
            })
        }
    }
}
</script>

<style>

</style>